//
//  Preferences.h
//  Pocket Doctor alpha version
//
//  Created by Sherif, Yin, Taylor, Jacob, Anna, Mike on 11-10-25.
//  Copyright (c) 2011 __Sytjam__. All rights reserved.
//
//Class Description: 
//- Security settings (passcode, secret question and answer) - and e-mail is sent when those are modified
//- Emergency Contact (can be set up and modified here)
//- Time Settings (preference between (12hr - 24hr clock) - (long day names - short day names)
//- Reset (reset the whole application all data (wiping the application's databases))
//
//Known Bugs: none.
//

#import <UIKit/UIKit.h>
#import <AudioToolbox/AudioToolbox.h>

@class MainMenu;
@class FirstTimeLaunch;
#import "AppDelegate.h"


@interface Preferences : UIViewController <UIAlertViewDelegate>{
    
    MainMenu *mm;
    FirstTimeLaunch *ftl;
    AppDelegate *aD;
    
    UITextField *oldPasscode;
    UITextField *changedPasscode;
    UITextField *confirmNewPasscode;
    UITextField *passcodeHint;
    UITextField *passcode;
    UITextField *SecretQuestion;
    UITextField *SecretAnswer;
    UITextField *emergencyContact;
    UILabel *userPasscode;
    UILabel *userSecretQuestion;
    UILabel *userSecretAnswer;
    UILabel *userEmailAddress;
    UIButton *changePasscode;
    UIButton *changeQuestionAnswer;
    UIButton *security;
    UIButton *emergencyContacts;
    UIButton *timeSettings;
    UIButton *doneEmergencyContact;
    UINavigationBar *header1;
    UINavigationBar *header2;
    UINavigationBar *header3;
    UINavigationItem *header3title;
    UIBarButtonItem *back1;
    UIBarButtonItem *back2;
    UIBarButtonItem *back3;
    UIButton *done1;
    UIButton *done2;
    UISegmentedControl *clockType;
    UISegmentedControl *dayType;
    UISegmentedControl *dateType;
    UILabel *clockTypeLabel;
    UILabel *dayTypeLabel;
    UILabel *dateTypeLabel;
    UIButton *reset;
    UIButton *resetConfrim;
    UINavigationBar *ringtoneHeader;
    UIBarButtonItem *ringtoneBackButton;
    UIButton *ringtoneSettings;
    UIButton *changeMedRing;
    UIButton *changeRefillRing;
    UILabel *currentMedRing;
    UILabel *currentRefillRing;
    UILabel *medRing;
    UILabel *refillRing;
    UITableView *ringtonesList;
    UINavigationBar *ringtoneListHeader;
    UIBarButtonItem *backToRingTone;
    UIButton *refillSettings;
    UILabel *refillStatement;
    UISlider *refillSlider;
    
    NSArray *sounds;
}

@property (retain,nonatomic) MainMenu *mm;
@property (retain,nonatomic) AppDelegate *aD;
@property (retain,nonatomic) FirstTimeLaunch *ftl;


@property (retain,nonatomic) IBOutlet UITextField *oldPasscode;
@property (retain,nonatomic) IBOutlet UITextField *changedPasscode;
@property (retain,nonatomic) IBOutlet UITextField *confirmNewPasscode;
@property (retain,nonatomic) IBOutlet UITextField *passcodeHint;
@property (retain,nonatomic) IBOutlet UITextField *passcode;
@property (retain,nonatomic) IBOutlet UITextField *SecretQuestion;
@property (retain,nonatomic) IBOutlet UITextField *SecretAnswer;
@property (retain,nonatomic) IBOutlet UITextField *emergencyContact;
@property (retain,nonatomic) IBOutlet UILabel *userPasscode;
@property (retain,nonatomic) IBOutlet UILabel *userSecretQuestion;
@property (retain,nonatomic) IBOutlet UILabel *userSecretAnswer;
@property (retain,nonatomic) IBOutlet UILabel *userEmailAddress;
@property (retain,nonatomic) IBOutlet UIButton *changePasscode;
@property (retain,nonatomic) IBOutlet UIButton *changeQuestionAnswer;
@property (retain,nonatomic) IBOutlet UIButton *security;
@property (retain,nonatomic) IBOutlet UIButton *emergencyContacts;
@property (retain,nonatomic) IBOutlet UIButton *timeSettings;
@property (retain,nonatomic) IBOutlet UIButton *doneEmergencyContact;
@property (retain,nonatomic) IBOutlet UINavigationBar *header1;
@property (retain,nonatomic) IBOutlet UINavigationBar *header2;
@property (retain,nonatomic) IBOutlet UINavigationBar *header3;
@property (retain,nonatomic) IBOutlet UINavigationItem *header3title;
@property (retain,nonatomic) IBOutlet UIBarButtonItem *back1;
@property (retain,nonatomic) IBOutlet UIBarButtonItem *back2;
@property (retain,nonatomic) IBOutlet UIBarButtonItem *back3;
@property (retain,nonatomic) IBOutlet UIButton *done1;
@property (retain,nonatomic) IBOutlet UIButton *done2;
@property (retain,nonatomic) IBOutlet UISegmentedControl *clockType;
@property (retain,nonatomic) IBOutlet UISegmentedControl *dayType;
@property (retain,nonatomic) IBOutlet UISegmentedControl *dateType;
@property (retain,nonatomic) IBOutlet UILabel *clockTypeLabel;
@property (retain,nonatomic) IBOutlet UILabel *dayTypeLabel;
@property (retain,nonatomic) IBOutlet UILabel *dateTypeLabel;
@property (retain,nonatomic) IBOutlet UIButton *reset;
@property (retain,nonatomic) IBOutlet UIButton *resetConfrim;
@property (retain,nonatomic) IBOutlet UIButton *ringtoneSettings;
@property (retain,nonatomic) IBOutlet UIButton *changeMedRing;
@property (retain,nonatomic) IBOutlet UIButton *changeRefillRing;
@property (retain,nonatomic) IBOutlet UILabel *currentMedRing;
@property (retain,nonatomic) IBOutlet UILabel *currentRefillRing;
@property (retain,nonatomic) IBOutlet UILabel *medRing;
@property (retain,nonatomic) IBOutlet UILabel *refillRing;
@property (retain,nonatomic) IBOutlet UINavigationBar *ringtoneHeader;
@property (retain,nonatomic) IBOutlet UIBarButtonItem *ringtoneBackButton;
@property (retain,nonatomic) IBOutlet UITableView *ringtonesList;
@property (retain,nonatomic) IBOutlet UINavigationBar *ringtoneListHeader;
@property (retain,nonatomic) IBOutlet UIBarButtonItem *backToRingTone;
@property (retain,nonatomic) IBOutlet UIButton *refillSettings;
@property (retain,nonatomic) IBOutlet UILabel *refillStatement;
@property (retain,nonatomic) IBOutlet UISlider *refillSlider;

@property (retain,nonatomic) NSArray *sounds;


- (IBAction)donePasscode:(id)sender;
- (IBAction)doneSecret:(id)sender;
- (IBAction)Security:(id)sender;
- (IBAction)ChangePasscode:(id)sender;
- (IBAction)ChangeSecret:(id)sender;
- (IBAction)Header1Back:(id)sender;
- (IBAction)Header2Back:(id)sender;
- (IBAction)ChooseEmergencyContacts;
- (IBAction)ChooseTimeSettings:(id)sender;
- (IBAction)DoneChangeEmergency:(id)sender;
- (IBAction)TapBackground:(id)sender;
- (IBAction)DoneKeyboard:(id)sender;
- (IBAction)checkPasscodeEmergency:(id)sender;
- (void)animateTextField: (UITextField *) textField up: (BOOL)up;
- (IBAction)textFieldDidEndEditing:(UITextField *)textField;
- (IBAction)textFieldDidBeginEditing:(UITextField *)textField;
- (IBAction)ResetButton:(id)sender;
- (IBAction)ResetDatabases:(id)sender;
- (IBAction)RingtoneSetting:(id)sender;
- (IBAction)ChangeMedicineRingtone:(id)sender;
- (IBAction)ChangeRefillRingtone:(id)sender;
- (IBAction)doneChangingRingtone:(id)sender;
- (IBAction)RefillSettings:(id)sender;
- (IBAction)RefillStatement:(id)sender;

@end


